RewriteEngine on

#Fix missing trailing slash char on folders
#RewriteRule ^([^.?]+[^.?/])$ $1/ [R,L]

# Rewrite homepage
RewriteRule ^/$ /content.aspx [I,L]
RewriteRule ^/sitemap.xml /sitemap.ashx [I,L]

RewriteRule ^admin/$ $1/admin/protected/default.aspx [R,L]
RewriteRule ^admin/protected/$ $1/admin/protected/default.aspx [R,L]

#Rewrite 1st level
RewriteRule ^([[:alnum:]-]+)$ /$1/ [RP]
RewriteRule ^([[:alnum:]-]+)/$ /$1/content.aspx [I,L]

#Rewrite all other levels
RewriteRule ^([[:alnum:]/-]+)/([[:alnum:]-]+)$ /$1/$2/ [RP]
RewriteRule ^([[:alnum:]/-]+)/([[:alnum:]-]+)/$ /$1/$2/content.aspx [I,L]